import fetch from 'common/src/utils/fetch';

/**
 *申请缓考
 */
function applyExam(data, applyType, applyReason) {
    return fetch({
        url:
            '/api/electionservice/graduateMyExam/addGraduateApplyList?applyType=' +
            applyType + '&applyReason=' + encodeURI(applyReason),
        method: 'post',
        data: data
    });
}

/**
 *取消申请
 */
function cancelApply(data, applyType) {
    return fetch({
        url:
            '/api/electionservice/graduateMyExam/cancelApply?applyType=' +
            applyType,
        method: 'post',
        data: data
    });
}

const pageUrl = '/api/electionservice/graduateMyExam/listMyExamTime';
const pageUrl2 = '/api/electionservice/graduateMyExam/listMyExamTime';

export default {
    applyExam: applyExam,
    cancelApply: cancelApply,
    pageUrl: pageUrl,
    pageUrl2: pageUrl2,
};
